from api.py03_add_staff import Ihrm_Add_Staff
from common.assert_tools import assert_tools

from common.get_header import get_header
from common.get_range_tel import get_rand_tel


class Test_Add_Staff(object):
    def test_add_success(self):
        tel = get_rand_tel()
        add_data = {"username": "黑马程序", "mobile": tel, "workNumber": "", "formOfEmployment": '1',
                "departmentId": '14', "timeOfEntry": "2025-03-03", "correctionTime": "2025-06-07T16:00:00.000Z",
                "staffPhoto": ""}
        header=get_header()
        resp = Ihrm_Add_Staff.add_staff_api(add_data,header)
        assert_tools(resp,200,10000,True,'员工新增成功')